import request from '@/utils/request';



// 登录接口
export const userLoginService = ({ userName, password }) =>
  request.post('/login', { userName, password });

// 获取用户基本信息
export const userGetInfoService = () => {
  return request.get('/users/profile');
};

// //更新用户基础信息
// export const userUpdateInfoService = ({ id, nickname, email }) => {
//   // console.log(id, nickname, email);
//   return request.put('/my/userinfo', { id, nickname, email });
// };

// //更新用户头像
// export const userUpdateAvatarService = (avatar) => {
//   return request.patch('/my/update/avatar', { avatar });
// };

// // 更新用户密码
// export const userUpdatePasswordService = ({ old_pwd, new_pwd, re_pwd }) => 
//     request.patch('/my/updatepwd', { old_pwd, new_pwd, re_pwd });